package chixing.day06.homework;

public class LoanCustomerTest {
    public static void main(String[] args) {
        LoanCustomer loanCustomer1 = new LoanCustomer("user1",10000,1000000);
        LoanCustomer loanCustomer2 = new LoanCustomer("user2",50000,10000);
        LoanCustomer loanCustomer3 = new LoanCustomer("user3",30000,70000);
        LoanCustomer loanCustomer4 = new LoanCustomer("user4",20000,30000);

           LoanCustomer[] loanCustomers = {loanCustomer1,loanCustomer2,loanCustomer3,loanCustomer4};
//        LoanCustomer[] loanCustomers = new LoanCustomer[4];
//        loanCustomers[0] = loanCustomer1;
        for (LoanCustomer l:loanCustomers) {
            if (l.isEligibleForMoreLoan()){
                System.out.println( l+ "有资格再贷款");
            }else {
                System.out.println(l+ "没有资格再贷款");
            }
        }
    }
}
